package edu.washington.cs.sounddetector.server.api.method;

import java.util.List;

import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.ToStringBuilder;

import edu.washington.cs.sounddetector.server.api.Method;
import edu.washington.cs.sounddetector.server.api.object.SoundClass;

public class SetSoundClassProperties implements Method
{

    private String detectorId;
    private List<SoundClass> soundClasses;

    public SetSoundClassProperties()
    {
    }

    /**
     * @param detectorId
     * @param soundClasses
     */
    public SetSoundClassProperties(String detectorId, List<SoundClass> soundClasses)
    {
        Validate.notBlank(detectorId);
        Validate.notEmpty(soundClasses);
        Validate.noNullElements(soundClasses);

        this.detectorId = detectorId;
        this.soundClasses = soundClasses;
    }

    /**
     * @return the detectorId
     */
    public String getDetectorId()
    {
        return detectorId;
    }

    /**
     * @param detectorId
     *            the detectorId to set
     */
    public void setDetectorId(String detectorId)
    {
        this.detectorId = detectorId;
    }

    /**
     * @return the soundClasses
     */
    public List<SoundClass> getSoundClasses()
    {
        return soundClasses;
    }

    /**
     * @param soundClasses
     *            the soundClasses to set
     */
    public void setSoundClasses(List<SoundClass> soundClasses)
    {
        this.soundClasses = soundClasses;
    }

    public String toString()
    {
        return new ToStringBuilder(this).append("soundClasses", soundClasses).toString();
    }
}
